package cn.tedu.ximart.server.controller;

import cn.tedu.ximart.server.pojo.dto.BrandCategoryAddNewDTO;
import cn.tedu.ximart.server.service.IBrandCategoryService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Api(tags = "品牌分类管理模块")
@RestController
@RequestMapping("/brand-categorise")
public class BrandCategoryController {

    @Autowired
    IBrandCategoryService brandCategoryService;


    @ApiOperation("添加品牌分类")
    @ApiOperationSupport(order = 100)
    @PostMapping("/add-new")
    public String addNew(BrandCategoryAddNewDTO brandCategoryAddNewDTO){
        brandCategoryService.addNew(brandCategoryAddNewDTO);
        return "ok";
    }
}
